package database

import (
	"gitee.com/easy_code/go-redis/interface/resp"
	"gitee.com/easy_code/go-redis/resp/reply"
)

// EchoDatabase 模拟redis内核
type EchoDatabase struct {
}

func NewEchoDatabase() *EchoDatabase {
	return &EchoDatabase{}
}

// Exec 将传递过来的消息，直接返回
func (e EchoDatabase) Exec(client resp.Connection, args [][]byte) resp.Reply {
	return reply.MakeMultiBulkReply(args)
}

func (e EchoDatabase) Close() {

}

func (e EchoDatabase) AfterClientClose(c resp.Connection) {

}
